﻿using System.Configuration;

namespace Framework.CustomConfigurationSectionsDefinition
{
    public class UrlsCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new UrlElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((UrlElement)element).Url;
        }

        public UrlElement this[int index]
        {
            get { return (UrlElement) BaseGet(index); }
        }
    }
}
